From 471759d83984040e87c97e21387e2940ff3c0cc3 Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Tue, 21 Feb 2006 11:19:13 +0000 Subject: [PATCH] Update to Linux 2.6.16-rc4. Signed-off-by: Christian Limpach --HG-- rename : patches/linux-2.6.16-rc3/i386-mach-io-check-nmi.patch => patches/linux-2.6.16-rc4/i386-mach-io-check-nmi.patch rename : patches/linux-2.6.16-rc3/net-csum.patch => patches/linux-2.6.16-rc4/net-csum.patch rename : patches/linux-2.6.16-rc3/pmd-shared.patch => patches/linux-2.6.16-rc4/pmd-shared.patch rename : patches/linux-2.6.16-rc3/smp-alts.patch => patches/linux-2.6.16-rc4/smp-alts.patch --- buildconfigs/mk.linux-2.6-xen | 6 +-- .../arch/x86_64/kernel/io_apic-xen.c | 16 +++++++ .../arch/x86_64/kernel/mpparse-xen.c | 4 +- linux-2.6-xen-sparse/drivers/char/tty_io.c | 7 ++- linux-2.6-xen-sparse/drivers/serial/Kconfig | 4 +- linux-2.6-xen-sparse/include/linux/mm.h | 2 + linux-2.6-xen-sparse/mm/memory.c | 10 +++++ linux-2.6-xen-sparse/mm/page_alloc.c | 44 ++++++++++--------- .../i386-mach-io-check-nmi.patch | 0 .../net-csum.patch | 0 .../pmd-shared.patch | 0 .../smp-alts.patch | 0 12 files changed, 62 insertions(+), 31 deletions(-) rename patches/{linux-2.6.16-rc3 => linux-2.6.16-rc4}/i386-mach-io-check-nmi.patch (100%) rename patches/{linux-2.6.16-rc3 => linux-2.6.16-rc4}/net-csum.patch (100%) rename patches/{linux-2.6.16-rc3 => linux-2.6.16-rc4}/pmd-shared.patch (100%) rename patches/{linux-2.6.16-rc3 => linux-2.6.16-rc4}/smp-alts.patch (100%) diff --git a/buildconfigs/mk.linux-2.6-xen b/buildconfigs/mk.linux-2.6-xen index 6f9bd2ca2c..80e4b85767 100644 --- a/buildconfigs/mk.linux-2.6-xen +++ b/buildconfigs/mk.linux-2.6-xen @@ -2,8 +2,8 @@ OS = linux LINUX_SERIES = 2.6 -LINUX_VER = 2.6.16-rc3 -LINUX_SRCS = linux-2.6.15.tar.bz2 patch-2.6.16-rc3.bz2 +LINUX_VER = 2.6.16-rc4 +LINUX_SRCS = linux-2.6.15.tar.bz2 patch-2.6.16-rc4.bz2 LINUX_PDIR = linux-$(LINUX_VER) EXTRAVERSION ?= xen @@ -34,7 +34,7 @@ pristine-$(LINUX_PDIR)/.valid-srcs: $(LINUX_SRCS) touch $(@D)/.hgskip touch $@ -pristine-linux-%.16-rc3/.valid-pristine: pristine-$(LINUX_PDIR)/.valid-srcs +pristine-linux-%.16-rc4/.valid-pristine: pristine-$(LINUX_PDIR)/.valid-srcs touch $@ # update timestamp to avoid rebuild $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref diff --git a/linux-2.6-xen-sparse/arch/x86_64/kernel/io_apic-xen.c b/linux-2.6-xen-sparse/arch/x86_64/kernel/io_apic-xen.c index 0ffe38e01f..b935fce320 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/io_apic-xen.c +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/io_apic-xen.c @@ -30,6 +30,9 @@ #include #include #include +#ifdef CONFIG_ACPI +#include +#endif #include #include @@ -310,6 +313,8 @@ __setup("apic", enable_ioapic_setup); And another hack to disable the IOMMU on VIA chipsets. + ... and others. Really should move this somewhere else. + Kludge-O-Rama. */ void __init check_ioapic(void) { @@ -358,6 +363,17 @@ void __init check_ioapic(void) #ifndef CONFIG_XEN if (apic_runs_main_timer != 0) break; +#ifdef CONFIG_ACPI + /* Don't do this for laptops right + right now because their timer + doesn't necessarily tick in C2/3 */ + if (acpi_fadt.revision >= 3 && + (acpi_fadt.plvl2_lat + acpi_fadt.plvl3_lat) < 1100) { + printk(KERN_INFO +"ATI board detected, but seems to be a laptop. Timer might be shakey, sorry\n"); + break; + } +#endif printk(KERN_INFO "ATI board detected. Using APIC/PM timer.\n"); apic_runs_main_timer = 1; diff --git a/linux-2.6-xen-sparse/arch/x86_64/kernel/mpparse-xen.c b/linux-2.6-xen-sparse/arch/x86_64/kernel/mpparse-xen.c index 5d3f6b3d3a..a5f74372ae 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/mpparse-xen.c +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/mpparse-xen.c @@ -295,9 +295,9 @@ static int __init smp_read_mpc(struct mp_config_table *mpc) memcpy(str,mpc->mpc_productid,12); str[12]=0; - printk(KERN_INFO "Product ID: %s ",str); + printk("Product ID: %s ",str); - printk(KERN_INFO "APIC at: 0x%X\n",mpc->mpc_lapic); + printk("APIC at: 0x%X\n",mpc->mpc_lapic); /* save the local APIC address, it might be non-default */ if (!acpi_lapic) diff --git a/linux-2.6-xen-sparse/drivers/char/tty_io.c b/linux-2.6-xen-sparse/drivers/char/tty_io.c index ddafa6c4ae..883ca869b3 100644 --- a/linux-2.6-xen-sparse/drivers/char/tty_io.c +++ b/linux-2.6-xen-sparse/drivers/char/tty_io.c @@ -1843,7 +1843,6 @@ static void release_dev(struct file * filp) tty_closing = tty->count <= 1; o_tty_closing = o_tty && (o_tty->count <= (pty_master ? 1 : 0)); - up(&tty_sem); do_sleep = 0; if (tty_closing) { @@ -1871,6 +1870,7 @@ static void release_dev(struct file * filp) printk(KERN_WARNING "release_dev: %s: read/write wait queue " "active!\n", tty_name(tty, buf)); + up(&tty_sem); schedule(); } @@ -1879,8 +1879,6 @@ static void release_dev(struct file * filp) * both sides, and we've completed the last operation that could * block, so it's safe to proceed with closing. */ - - down(&tty_sem); if (pty_master) { if (--o_tty->count < 0) { printk(KERN_WARNING "release_dev: bad pty slave count " @@ -1894,7 +1892,6 @@ static void release_dev(struct file * filp) tty->count, tty_name(tty, buf)); tty->count = 0; } - up(&tty_sem); /* * We've decremented tty->count, so we need to remove this file @@ -1939,6 +1936,8 @@ static void release_dev(struct file * filp) read_unlock(&tasklist_lock); } + up(&tty_sem); + /* check whether both sides are closing ... */ if (!tty_closing || (o_tty && !o_tty_closing)) return; diff --git a/linux-2.6-xen-sparse/drivers/serial/Kconfig b/linux-2.6-xen-sparse/drivers/serial/Kconfig index b9f084045f..fa1fdb0b37 100644 --- a/linux-2.6-xen-sparse/drivers/serial/Kconfig +++ b/linux-2.6-xen-sparse/drivers/serial/Kconfig @@ -903,8 +903,8 @@ config SERIAL_JSM something like this to connect more than two modems to your Linux box, for instance in order to become a dial-in server. This driver supports PCI boards only. - If you have a card like this, say Y here and read the file - . + + If you have a card like this, say Y here, otherwise say N. To compile this driver as a module, choose M here: the module will be called jsm. diff --git a/linux-2.6-xen-sparse/include/linux/mm.h b/linux-2.6-xen-sparse/include/linux/mm.h index adbf47dd25..b53938e6d1 100644 --- a/linux-2.6-xen-sparse/include/linux/mm.h +++ b/linux-2.6-xen-sparse/include/linux/mm.h @@ -1064,5 +1064,7 @@ int shrink_slab(unsigned long scanned, gfp_t gfp_mask, void drop_pagecache(void); void drop_slab(void); +extern int randomize_va_space; + #endif /* __KERNEL__ */ #endif /* _LINUX_MM_H */ diff --git a/linux-2.6-xen-sparse/mm/memory.c b/linux-2.6-xen-sparse/mm/memory.c index a75e302806..351b31624e 100644 --- a/linux-2.6-xen-sparse/mm/memory.c +++ b/linux-2.6-xen-sparse/mm/memory.c @@ -82,6 +82,16 @@ EXPORT_SYMBOL(num_physpages); EXPORT_SYMBOL(high_memory); EXPORT_SYMBOL(vmalloc_earlyreserve); +int randomize_va_space __read_mostly = 1; + +static int __init disable_randmaps(char *s) +{ + randomize_va_space = 0; + return 0; +} +__setup("norandmaps", disable_randmaps); + + /* * If a p?d_bad entry is found while walking page tables, report * the error, before resetting entry to p?d_none. Usually (but diff --git a/linux-2.6-xen-sparse/mm/page_alloc.c b/linux-2.6-xen-sparse/mm/page_alloc.c index 6ed2cade48..d24d1a1c7f 100644 --- a/linux-2.6-xen-sparse/mm/page_alloc.c +++ b/linux-2.6-xen-sparse/mm/page_alloc.c @@ -56,6 +56,7 @@ long nr_swap_pages; int percpu_pagelist_fraction; static void fastcall free_hot_cold_page(struct page *page, int cold); +static void __free_pages_ok(struct page *page, unsigned int order); /* * results with 256, 32 in the lowmem_reserve sysctl: @@ -169,20 +170,23 @@ static void bad_page(struct page *page) * All pages have PG_compound set. All pages have their ->private pointing at * the head page (even the head page has this). * - * The first tail page's ->mapping, if non-zero, holds the address of the - * compound page's put_page() function. - * - * The order of the allocation is stored in the first tail page's ->index - * This is only for debug at present. This usage means that zero-order pages - * may not be compound. + * The first tail page's ->lru.next holds the address of the compound page's + * put_page() function. Its ->lru.prev holds the order of allocation. + * This usage means that zero-order pages may not be compound. */ + +static void free_compound_page(struct page *page) +{ + __free_pages_ok(page, (unsigned long)page[1].lru.prev); +} + static void prep_compound_page(struct page *page, unsigned long order) { int i; int nr_pages = 1 << order; - page[1].mapping = NULL; - page[1].index = order; + page[1].lru.next = (void *)free_compound_page; /* set dtor */ + page[1].lru.prev = (void *)order; for (i = 0; i < nr_pages; i++) { struct page *p = page + i; @@ -196,7 +200,7 @@ static void destroy_compound_page(struct page *page, unsigned long order) int i; int nr_pages = 1 << order; - if (unlikely(page[1].index != order)) + if (unlikely((unsigned long)page[1].lru.prev != order)) bad_page(page); for (i = 0; i < nr_pages; i++) { @@ -1539,29 +1543,29 @@ static int __initdata node_load[MAX_NUMNODES]; */ static int __init find_next_best_node(int node, nodemask_t *used_node_mask) { - int i, n, val; + int n, val; int min_val = INT_MAX; int best_node = -1; - for_each_online_node(i) { - cpumask_t tmp; + /* Use the local node if we haven't already */ + if (!node_isset(node, *used_node_mask)) { + node_set(node, *used_node_mask); + return node; + } - /* Start from local node */ - n = (node+i) % num_online_nodes(); + for_each_online_node(n) { + cpumask_t tmp; /* Don't want a node to appear more than once */ if (node_isset(n, *used_node_mask)) continue; - /* Use the local node if we haven't already */ - if (!node_isset(node, *used_node_mask)) { - best_node = node; - break; - } - /* Use the distance array to find the distance */ val = node_distance(node, n); + /* Penalize nodes under us ("prefer the next node") */ + val += (n < node); + /* Give preference to headless and unused nodes */ tmp = node_to_cpumask(n); if (!cpus_empty(tmp)) diff --git a/patches/linux-2.6.16-rc3/i386-mach-io-check-nmi.patch b/patches/linux-2.6.16-rc4/i386-mach-io-check-nmi.patch similarity index 100% rename from patches/linux-2.6.16-rc3/i386-mach-io-check-nmi.patch rename to patches/linux-2.6.16-rc4/i386-mach-io-check-nmi.patch diff --git a/patches/linux-2.6.16-rc3/net-csum.patch b/patches/linux-2.6.16-rc4/net-csum.patch similarity index 100% rename from patches/linux-2.6.16-rc3/net-csum.patch rename to patches/linux-2.6.16-rc4/net-csum.patch diff --git a/patches/linux-2.6.16-rc3/pmd-shared.patch b/patches/linux-2.6.16-rc4/pmd-shared.patch similarity index 100% rename from patches/linux-2.6.16-rc3/pmd-shared.patch rename to patches/linux-2.6.16-rc4/pmd-shared.patch diff --git a/patches/linux-2.6.16-rc3/smp-alts.patch b/patches/linux-2.6.16-rc4/smp-alts.patch similarity index 100% rename from patches/linux-2.6.16-rc3/smp-alts.patch rename to patches/linux-2.6.16-rc4/smp-alts.patch -- 2.30.2